package com.translate.web.service;
import java.math.BigDecimal;
import java.util.List;

import com.basic.service.contract.IBaseService;
import com.translate.entity.Order;
import com.translate.entity.PayManager;
import com.translate.web.param.contract.IManuscriptAddParam;
import com.translate.web.param.contract.IPayBehaviorRequestParam;
import com.translate.web.param.contract.IPayManagerAddParam;
import com.translate.web.param.contract.IPayManagerServiceAddParam;

public interface IPayManagerService extends IBaseService<PayManager>, IOrderInfoService { 
	
	/**
	 * 取消订单
	 * @param managerId
	 * @param userId
	 * @return
	 */
	int cancelOrder(int managerId, int userId);
	List<Order> getOrdersByPayManagerIdAndPayType(int payManagerId, int userId);

	int cancelTicket(int UserId);
	/**
	 * 统计团队支付金额
	 * @param teamId
	 * @return
	 */
	BigDecimal sumPriceByTeam(int teamId);
	
	/**
	 * 统计余额支付的
	 * @param teamId
	 * @return
	 */
	BigDecimal sumPriceByRechargePay(int teamId);
	
	
	
	/**
	 * 取消订单
	 * @param managerId
	 * @param userId
	 * @return
	 */
	int cancelOrderByTeam(int managerId, int teamId);
	
	/**
	 * 获取支付管理数据
	 * @param managerId
	 * @param userId
	 * @return
	 */
	PayManager getPayManager(int managerId, int teamId);
	
	
	
	/**
	 * 根据参数获取订单
	 * @param payBehaviorRequestParam
	 * @return
	 */
	PayManager getPayManager(IPayBehaviorRequestParam payBehaviorRequestParam);
	
	/**
	 * 根据参数获取团队订单
	 * @param payBehaviorRequestParam
	 * @return
	 */
	PayManager getPayManagerByTeam(IPayBehaviorRequestParam payBehaviorRequestParam);
	
	
	
	/**
	 * 支付成功
	 * @param behaviorRequestParam
	 * @return
	 */
	int paySuccess(IPayBehaviorRequestParam behaviorRequestParam);
	
	
	/**
	 * 支付成功
	 * @param behaviorRequestParam
	 * @return
	 */
	int paySuccessByTeam(IPayBehaviorRequestParam behaviorRequestParam);
	
	
	/**
	 * 待确认
	 * @param behaviorRequestParam
	 * @return
	 */
	int toBeConfirmed(IPayBehaviorRequestParam behaviorRequestParam);

	
	/**
	 * 待确认
	 * @param behaviorRequestParam
	 * @return
	 */
	int toBeConfirmedByTeam(IPayBehaviorRequestParam behaviorRequestParam);
	
	
	
	/**
	 * 取消单个订单 减少金额
	 * @param paymanagerId
	 * @param amount
	 * @return
	 */
	int updateMoney(int paymanagerId, BigDecimal amount, String typeName, boolean iscancel);
	
	/**
	 * 作图立即支付
	 * @return
	 */
	int drawAndPayImmediately(
		IPayBehaviorRequestParam behaviorRequestParam,
		BigDecimal money,
		int teamId,
		String orderSn,
		String serviceType
	);

	
}
